package com.wing.member.model.request;

import com.wing.member.model.entity.MemberAuth;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;


/**
 * 注册表单
 *
 * @author
 */
@Data
public class RegisterForm {

    @NotBlank(message = "{member.login.account.notExist}", groups = {RegisterForm.Login.class})
    private String identifier;

    private Integer captcha;

	@NotBlank(message = "{member.login.password.error}", groups = {RegisterForm.Register.class, RegisterForm.Login.class, RegisterForm.ForgotPassword.class, RegisterForm.ForgotPayPassword.class})
	private String password;

    @NotBlank(message = "{member.login.payPassword.error}", groups = {RegisterForm.Register.class})
    private String payPassword;

    @NotEmpty(message = "{member.login.inviteCode.error}", groups = {RegisterForm.Register.class})
    private String inviteCode;

    @NotNull(message = "{common.parameter.error}", groups = {RegisterForm.Register.class, RegisterForm.Login.class, RegisterForm.ForgotPassword.class, RegisterForm.ForgotPayPassword.class, RegisterForm.Binding.class})
    private MemberAuth.Type type;

    @NotEmpty(message = "{member.login.inviteCode.error}", groups = {RegisterForm.Register.class})
    private String username;

    //@NotBlank(message = "{common.parameter.error}", groups = {RegisterForm.Login.class})
    private String clientId;

    //@NotNull(message = "{common.parameter.error}", groups = {RegisterForm.Login.class})
    private Integer platform;

    private String ipAddress;

    public interface Register{}

    public interface Login{}

    public interface ForgotPassword{}

    public interface ForgotPayPassword{}

    public interface Binding{}
}
